Filtering Records to Include a Single Field Value

Description

This demonstration of Action Scripting adds a button to the Edit_Customer_Info form. This script will restrict all the records that the form displays to those where "MA" is the value in the Bill_State_Region field.

    • Sketch a button on the form.

    • Enter "MA Only" into the Label field.

    • Click Launch Script Editor.

    • Click Add New Action.

    • Select "Query" from the Category list and "Run Custom Query" from the Action list. Click OK.

      images/AL_form_edit_customer_info_select_action.gif
  1. Click the Filter ('funnel' icon) button at the right side of the Filter field.

  2. Select the "Bill_state_region" field, the "is equal to" operator, and enter "MA" into the first condition. Click OK.

    images/AL_form_edit_customer_info_MA_filter_builder.gif
  3. The result looks like this.

    images/AL_form_edit_customer_info_MA_query.gif
  4. Click Next > Finish > Finish to return to the Form Editor.

  5. Click Save.

See Also